<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>
  Release 2.6.0
</title>
</head>
<body bgcolor="#ffffff">
<h1>Release 2.6.0</h1>

This release contains a large number of changes, in particular to the ZAP API.<br>
We have added a significant number of new API endpoints, working towards our goal of making ZAP completely controllable via the API.
We have also changed some of the existing endpoints and in all cases these changes are backwards compatible.
<p>
The full release also includes a new JxBrowser add-on as well as platform specific webdrivers to make it even easier to 
interact with ZAP through a wide variety of browsers.

<h2>API Security Changes</h2>

We have changed the API security in response to issues reported to us via our <a href="https://bugcrowd.com/owaspzap">bug bounty program</a>. 
Details of the vulnerabilities are given below.<br>
The security changes are by necessity not backwards compatible, although we have include options for disabling them if you use ZAP in a safe environment.
<p>

By default all API calls now require either the API key or a nonce. 
These can be supplied via URL parameters, POST parameters or headers.
The supported ZAP API clients (including Java and Python) have been updated to supply the API key via a header.
Nonces are generated by ZAP and are intended to be used by ZAP add-ons that need to access the ZAP API. 
For full details see the <a href="../ui/dialogs/options/api.html">Options API screen</a>.
<p>
There are a set of new API options related to security:
<ul>
<li>UI Enabled - If enabled then the API Web UI is available to all machines that are able to use ZAP as a proxy. This is enabled by default.</li>
<li>IP addresses permitted to use the API - By default only the machine ZAP is running on is able to access the ZAP API. You can allow other machines access to the API by adding suitable regex patterns. You should only add IP addresses that you trust.</li>
<li>Do not require an API key for safe operations - If enabled then the API key is not required for Views or Other operations that are considered 'safe', in other words operations that do not make any changes to ZAP. Such operations do however give access to ZAP data such as alert, messages, and file system paths.  They can also be used by web applications to detect the presence of ZAP.</li>
<li>Report permission errors via API - If enabled then ZAP will report permission errors via the API, which can be used by web applications to detect the presence of ZAP. This is not a serious problem in a safe environment but if you are using ZAP against potentially malicious sites then you should not enable it.</li>
</ul>

All ZAP options can be specified via the command line when you start ZAP - 
see the <a href="https://github.com/zaproxy/zaproxy/wiki/FAQapikey">API Key FAQ</a> for full details.<br>
We have also added even more security headers to the API including a strong Content Security Policy.

<h2>Enhancements</h2>
<ul>
<li>Issue 368 : API - report URLS just found by spider</li>
<li>Issue 689 : Improve Scope management</li>
<li>Issue 958 : Java version identification when an environment variable for Java is exported</li>
<li>Issue 1853 : Allow to active scan a Context through ZAP API</li>
<li>Issue 1952 : Do not allow Contexts with same name</li>
<li>Issue 2117 : set / update default threshold and strength for a scan policy</li>
<li>Issue 2334 : Enable searching in ZAP Addons Pop-up</li>
<li>Issue 2415 : Show the reason why an active scanner was skipped</li>
<li>Issue 2559 : Do not clean up unsaved (file based) sessions</li>
<li>Issue 2570 : Change proxy option to remove unsupported encoding</li>
<li>Issue 2592 : Differentiate the source of alerts</li>
<li>Issue 2611 : Change HTTP breakpoint dialogues to modal</li>
<li>Issue 2633 : Enhance Client Cert File Chooser</li>
<li>Issue 2647 : Support a/pscan rule configuration</li>
<li>Issue 2655 : Provide skip reason for Script Active Scan Rules</li>
<li>Issue 2682 : Sort (main) help add-on TOC entries</li>
<li>Issue 2690 : Support ignoring specified forms when checking for CSRF vulnerabilities</li>
<li>Issue 2699 : Enhancement Request: Improve SSL Negotiation Failure Error Handling</li>
<li>Issue 2701 : Enhancement Request: Factory Reset</li>
<li>Issue 2723 : Support POST requests for API actions</li>
<li>Issue 2728 : Allow to remove spider parsers and filters</li>
<li>Issue 2742 : Allow for override/customization of Java's "networkaddress.cache.ttl" value</li>
<li>Issue 2750 : Add a reasonably strong CSP to the API</li>
<li>Issue 2773 : Use UTF-8 to read/write ZAP scripts</li>
<li>Issue 2782 : Support the -configfile cmdline parameter</li>
<li>Issue 2825 : Additional Commentary for JS templates</li>
<li>Issue 2853 : Override Alert details</li>
<li>Issue 2855 : Support break functionality in the API</li>
<li>Issue 2865 : Normalise Include/Exclude context panels</li>
<li>Issue 2886 : Option to generate reports in Markdown format</li>
<li>Issue 2891 : Show the cause why a script was not loaded</li>
<li>Issue 2936 : Always set Java mem to 1/4 available (over 512Mb)</li>
<li>Issue 2937 : Change ZAP API to read/use the request body</li>
<li>Issue 2939 : Use non absolute URI base HTML element in spider</li>
<li>Issue 2951 : Support active scan rule and scan max duration</li>
<li>Issue 2954 : Allow to export a Context through the context menu</li>
<li>Issue 2966 : Use L&amp;F specified through JVM args</li>
<li>Issue 2970 : Allow to configure, by script type, the enabled state of new/loaded scripts</li>
<li>Issue 2982 : Allow to disable default standard output logging</li>
<li>Issue 2994 : show column 'Size Resp. Body' of history in bytes</li>
<li>Issue 3004 : Allow to passive scan just HTTP messages in scope</li>
<li>Issue 3028 : Value Generator (previously Form Handling)</li>
<li>Issue 3038 : Return request's type through the ZAP API</li>
<li>Issue 3042 : Allow to select multiple parameters in Params tab</li>
<li>Issue 3050 : Return requests' timestamp/RTT through the ZAP API</li>
<li>Issue 3058 : Allow to configure the domains always in spider scope (Spider API)</li>
<li>Issue 3061 : Allow to deprecate API endpoints</li>
<li>Issue 3069 : Context structural parameter only accepts alphanumeric charts</li>
<li>Issue 3079 : Added cookie ignore list rule and inc sleep default to 20 to reduce FPs</li>
<li>Issue 3081 : Change default time to 15 and make publicly accessible</li>
<li>Issue 3090 : Be more lenient on add-on's file name format</li>
<li>Issue 3098 : Log to file even if ZAP is run 'inline'</li>
<li>Issue 3118 : include subjectAlternativeName extension in generated certificates</li>
<li>Issue 3123 : Added security annotations for forms that dont need anti CSRF tokens</li>
<li>Issue 3130 : Added autoupdate API calls</li>
<li>Issue 3149 : Baseline: Support context file and in-progress issues</li>
<li>Issue 3159 : Allow esc to Close Marketplace Dialog</li>
<li>Issue 3163 : Autoselect Imported Certificate</li>
<li>Issue 3176 : Allow to show more request data in History tab</li>
<li>Issue 3195 : Add workaround to local proxy for Android emulator</li>
<li>Issue 3226 : Option to supply API key or nonces via header</li>
<li>Issue 3227 : Limit API access to whitelisted IP addresses</li>
<li>Issue 3229 : Use Referrer-Policy in ZAP API</li>
<li>Issue 3232 : Active Scan API - Allow to start the scans with non-leaf nodes</li>
<li>Issue 3238 : Add driver entries for CSPid Virtual Smartcards</li>
<li>Issue 3261 : Client Cert PKCS#11 - UI/Exception Handling</li>
<li>Issue 3285 : Edit Alert Enhancements</li>
<li>Issue 3290 : Show requests with I/O errors in Spider tab</li>
<li>Issue 3296 : Create script directories when initialising the home dir</li>
<li>Issue 3297 : Start local proxy after processing command line arguments when in daemon mode</li>
</ul>

<h2>Bug fixes</h2>
<ul>
<li>Issue 1107 : Additional Commentary needed for Script Templates/Examples</li>
<li>Issue 1152 : Passive CSRF Sensor Reports Missing CSRF Tokens for all Forms, not just POST Requests Missing Anti-CSRF Tokens</li>
<li>Issue 1212 : False positives in SQLi tests</li>
<li>Issue 2176 : NPEs during zapbot WAVSEP scans</li>
<li>Issue 2218 : Persisted Sessions don't save unconfigured Default Context</li>
<li>Issue 2546 : ZAP access URLs which are out of scope</li>
<li>Issue 2550 : GUI freezes while opening Scan Progress dialogue</li>
<li>Issue 2561 : Use UTF-8 to write the HTML Report</li>
<li>Issue 2578 : Minor Usability Issue: Must click on text in Options column to select row</li>
<li>Issue 2585 : Remove temp Sequence requests on session clean up</li>
<li>Issue 2586 : Use option All Requests from Active Scan dialogue</li>
<li>Issue 2605 : Prevent GUI hang when adding messages to History</li>
<li>Issue 2608 : Removing a DDN from a Context Does Not Appear to Trigger an Update to the Sites Tab</li>
<li>Issue 2637 : Prevent API UI from being loaded in a frame</li>
<li>Issue 2642 : Slow mouse wheel scrolling in site tree</li>
<li>Issue 2657 : Correct persistence of disabled extensions</li>
<li>Issue 2674 : Automated authentication requests shown in HTTP Sessions tab</li>
<li>Issue 2681 : Fix exception while adding script through the API</li>
<li>Issue 2694 : Ability to set Excluded Parameters from the API</li>
<li>Issue 2696 : Enable Copy URLs pop up menu item for all messages</li>
<li>Issue 2707 : Manual add-on installation needs more meaningful dialog messages</li>
<li>Issue 2735 : Wiki: ModesAndScope doesn't cover ATTACK mode</li>
<li>Issue 2736 : Bug: Can't generate reports from saved Session data</li>
<li>Issue 2737 : Correct API error message on missing script params</li>
<li>Issue 2745 : Spider Exception when sitemap.xml not found</li>
<li>Issue 2748 : ZAP Spidering HTML Forms with multiple submit buttons</li>
<li>Issue 2757 : Alerts with different request method are considered the same</li>
<li>Issue 2774 : Wrong value shown in fuzz location for body text when selected through combined view</li>
<li>Issue 2792 : Able to overlap fuzz (HTTP) locations</li>
<li>Issue 2793 : Wrong highlight in combined view with last part of request header</li>
<li>Issue 2810 : Active scanners' alerts persisted twice when with GUI</li>
<li>Issue 2836 : ZAP hsqldb OutOfMemoryError when deleting records on cleanup</li>
<li>Issue 2862 : XSS in url on page with no parameters not found</li>
<li>Issue 2874 : Correct offset calculation in text header views</li>
<li>Issue 2898 : Tweak spider parser to ignore/strip matched parenthesis around URLs</li>
<li>Issue 2935 : Wrong charset used in response body if no charset set</li>
<li>Issue 2977 : HTTP500 from JSON/httpSessions/view/sessions/?site=FOO</li>
<li>Issue 3002 : Correctly render all nodes in checkbox tree</li>
<li>Issue 3041 : Fix concurrency issues when publishing ZAP events</li>
<li>Issue 3052 : Correct the loading of extensions' enabled state</li>
<li>Issue 3054 : Clear old contexts, always, when loading a session</li>
<li>Issue 3073 : Skip process automated msgs for HTTP Sessions tab</li>
<li>Issue 3100 : Context's in scope change might not be applied</li>
<li>Issue 3142 : Properly show excluded parameters through ZAP API</li>
<li>Issue 3157 : Session Comparison Exception</li>
<li>Issue 3175 : Cancel/save StandardFieldsDialog on escape key</li>
<li>Issue 3192 : URLs included in context are disregarded by the spider</li>
<li>Issue 3211 : Can't find .ZAP_JVM.properties with %HOMEPATH% when using zap.bat in windows</li>
<li>Issue 3215 : History Filter dialog cant be scaled</li>
<li>Issue 3221 : Some icons not scaled correctly</li>
<li>Issue 3224 : HTML injection in "Alert" tab</li>
<li>Issue 3275 : Global Exclude URL (beta) - after close and reopen does not pick up added regex for excluding URLs</li>
<li>Issue 3278 : Reset proxy excluded URLs on new session</li>
<li>Issue 3309 : Improve node enumeration in pre-scan phase</li>
<li>Issue 3320 : Correct creation of Git/SVN spider seeds</li>
<li>Issue 3330 : Apply config arguments in the order specified</li>
</ul>

<h2>ZAP API Changed Endpoints:</h2>

<h3>ACTION ascan / scan</h3>

The url parameter is now optional and an optional contextId parameter has been added. You must supply one of these.

<h3>ACTION ascan / scanAsUser</h3>

The url and contextId parameters are now optional. You must supply one of these.

<h3>ACTION ascan / addScanPolicy</h3>

Added optional alertThreshold and attackStrength parameters.


<h2>ZAP API New Endpoints:</h2>

<h3>VIEW ascan / optionMaxRuleDurationInMins</h3>

Returns the maximum time in minutes that a scan rule can run for, zero is unlimited.

<h3>VIEW ascan / optionMaxScanDurationInMins</h3>

Returns the maximum time in minutes that a full scan can run for, zero is unlimited.

<h3>ACTION ascan / setOptionMaxRuleDurationInMins</h3>

Sets the maximum time in minutes that a scan rule can run for, zero is unlimited.

<h3>ACTION ascan / setOptionMaxScanDurationInMins</h3>

Sets the maximum time in minutes that a full scan can run for, zero is unlimited.

<h3>ACTION ascan / updateScanPolicy</h3>

Updates the specified scan policy with the specified alertThreshold or attackStrength.

<h3>VIEW break / isBreakAll</h3>

Returns True if ZAP will break on both requests and responses.

<h3>VIEW break / isBreakRequest</h3>

Returns True if ZAP will break on requests.

<h3>VIEW break / isBreakResponse</h3>

Returns True if ZAP will break on responses.

<h3>VIEW break / httpMessage</h3>

Returns the HTTP message currently intercepted (if any).

<h3>ACTION break / break</h3>

Controls the global break functionality. The type may be one of: http-all, http-request or http-response. The state may be true (for turning break on for the specified type) or false (for turning break off). Scope is not currently used.

<h3>ACTION break / setHttpMessage</h3>

Overwrites the currently intercepted message with the data provided.

<h3>ACTION break / continue</h3>

Submits the currently intercepted message and unsets the global request/response break points.

<h3>ACTION break / step</h3>

Submits the currently intercepted message, the next request or response will automatically be intercepted.

<h3>ACTION break / drop</h3>

Drops the currently intercepted message.

<h3>VIEW core / optionDnsTtlSuccessfulQueries</h3>

Gets the TTL (in seconds) of successful DNS queries.

<h3>ACTION core / sendRequest</h3>

Sends the HTTP request, optionally following redirections. Returns the request sent and response received and followed redirections, if any. The Mode is enforced when sending the request (and following redirections), custom manual requests are not allowed in 'Safe' mode nor in 'Protected' mode if out of scope.

<h3>ACTION core / setOptionDnsTtlSuccessfulQueries</h3>

Sets the TTL (in seconds) of successful DNS queries (applies after ZAP restart).

<h3>OTHER core / mdreport</h3>

Generates a report in Markdown format.

<h3>VIEW httpSessions / sites</h3>

Gets all of the sites that have sessions.

<h3>VIEW pscan / scanOnlyInScope</h3>

Tells whether or not the passive scan should be performed only on messages that are in scope.

<h3>ACTION pscan / setScanOnlyInScope</h3>

Sets whether or not the passive scan should be performed only on messages that are in scope.

<h3>VIEW spider / allUrls</h3>

Returns a list of unique URLs from the history table based on HTTP messages added by the Spider.

<h3>VIEW spider / optionMaxChildren</h3>

Gets the maximum number of child nodes (per node) that can be crawled, 0 means no limit.

<h3>ACTION spider / setOptionMaxChildren</h3>

Sets the maximum number of child nodes (per node) that can be crawled, 0 means no limit.

<h2>Vulnerability Details</h2>

The following vulnerabilities have been reported in previous versions of ZAP.
Other less serious issues have been also been fixed as a matter of course.<br>
Many thanks to all of the researchers who have ethically reported these issues to us via our <a href="https://bugcrowd.com/owaspzap">bug bounty program</a>. 
If you need more details about any of these vulnerabilities then please contact us.

<h3>RCE via Anti CSRF Test Form and API Key Disclosure</h3>

If the user used the Anti CSRF Test Form against a specifically crafted HTML page then the API key was leaked to that site.
The site could then access the ZAP API and perform any action, including uploading ZAP scripts. Scripts can only be uploaded from ‘local’ filesystems but if the user is running ZAP on Windows then the attacker can make a malicious script available via a public SMB share. This appears to ZAP to be a local file and the script is therefore uploaded and can be run via the API.
<br>
The requirement for the API key or nonce on all API operations are a direct result of this vulnerability, as are changing add-ons to use nonces to reduce the risk of leaking the API key.
<br><br>
<b>Credit: Artemy Bogdanov (@Abr1k0s)</b>
<br>
Artemy was awarded a $1000 bug bounty as a result of this submission. This is the first bug bounty we have paid out - congratulations Artemy!

<h3>Windows Installer Vulnerable to DLL Hijacking</h3>

The ZAP Windows Installer for all versions up to and including 2.5.0 are vulnerable to DLL Hijacking on Windows 7 (and earlier versions).
This is a vulnerability in the in 3rd party installer InnoSetup.
The 2.6.0 Installers (on all platforms) are now generated using Install4J.
<br><br>
If for some reason you do need to install previous versions of ZAP on Windows 7 or earlier then we recommend that you move the installer to a clean directory before running it.
<br><br>
Note that Burp Suite also use Install4J so future vulnerabilities in Install4j-generated installers may be eligible for the Burp Suite bug bounty program: <a href="https://hackerone.com/portswigger">https://hackerone.com/portswigger</a>
<br><br>
<b>Credit: James Kettle (Burp Suite)</b>

<h3>Arbitrary Code Execution via Invoke Applications Parameter Injection</h3>
 
HTML parameters could be specifically crafted to cause arbitrary code execution, if the user choose to invoke the targeted application with a request containing that parameter from within ZAP.
<br>
The Invoke Applications add-on has been updated to fix this issue - all ZAP users should install this new version before continuing to use the add-on.
<br><br>
<b>Credit: Artemy Bogdanov (@Abr1k0s)</b>

<h3>XSS via Anti CSRF Test Form</h3>

The Anti CSRF Test Form was vulnerable to XSS attacks if run against a specifically crafted HTML page.
<br>
The API now uses a strong Content Security Policy to prevent such issues
<br><br>
<b>Credit: g_sato - <a href="https://bugcrowd.com/g_sato">https://bugcrowd.com/g_sato</a></b>

<h3>API Vulnerable to DNS Rebinding</h3>

The API was vulnerable to DNS Rebinding attacks.
It now checks the host header and rejects any requests from unexpected hosts.
<br><br>
<b>Credit: Artemy Bogdanov (@Abr1k0s)</b>

<h2>See also</h2>
<table>
<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><a href="../intro.html">Introduction</a></td><td>the introduction to ZAP</td></tr>
<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><a href="releases.html">Releases</a></td><td>the full set of releases</td></tr>
<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><a href="../credits.html">Credits</a></td><td>the people and groups who have made this release possible</td></tr>
</table>
</body>
</html>
